package com.mxf.code.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonValue;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * Date:2022/2/15
 * Author:ybc
 * Description:
 */
@Getter
@AllArgsConstructor
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum SexEnum implements BaseEnum {
    /**
     * 男
     */
    MALE(0,"男"),
    /**
     * 女
     */
    FEMALE(1,"女");

    /**
     * 性别编码
     */
    @EnumValue
    private Integer code;
    @JsonValue
    private String value;

    SexEnum(int code) {
        this.code = code;
    }


    @Override
    public Integer getCode() {
        return code;
    }
}
